import clear from 'rollup-plugin-clear';
import { sizeSnapshot } from 'rollup-plugin-size-snapshot';
import visualizer from 'rollup-plugin-visualizer';

export default {
  input: './src/begonia.js',
  output: {
    file: './dist/index.js',
    format: 'esm',
    banner: `// begonia.js v2.0.0 Brave Chan on 2021.3`
  },
  plugins: [
    clear({
      targets: ['dist']
    }),
    sizeSnapshot({
      snapshotPath: './analyze/.size-snapshot.json'
    }),
    // visualizer({
    //   filename: './analyze/stats.html',
    //   title: 'result size',
    //   open: true
    // })
  ]
};
